<template>
    <div>
        <el-descriptions :title="title">

            <el-descriptions-item v-for="(item,index) in detailList" :key="index" :label="item.label">
                <template v-if="item.type=='image'">
                    <img  v-for="(imgUrl,index2) in currentData[item.name]" :key="index2" :src="imgServer+imgUrl" alt="">
                    <!-- <img :src="imgServer+'/upload/'+currentData[item.name][0]" alt=""> -->
                </template>
                <template v-else-if="item.type=='enum'">
                    {{ item.options.find((opt)=>{  return opt.value == currentData[item.name] })?.label    }} 

                    <!-- {{ item.options }}====
                    {{ currentData[item.name] }}  -->
                </template>
                <template v-else>
                    {{  currentData[item.name] }}
                </template>
                
            </el-descriptions-item>


            <!-- <el-descriptions-item label="昵称">{{ currentData.nickname }}</el-descriptions-item>
            <el-descriptions-item label="手机号">{{ currentData.phone }}</el-descriptions-item>
            <el-descriptions-item label="图像">{{ currentData.icon }}</el-descriptions-item>
            <el-descriptions-item label="性别">{{ currentData.gender }}</el-descriptions-item>
            <el-descriptions-item label="生日">{{ currentData.birthday }}</el-descriptions-item>
            <el-descriptions-item label="从事行业">{{ currentData.industry }}</el-descriptions-item>
            <el-descriptions-item label="生活状态">{{ currentData.status }}</el-descriptions-item>
            
            <el-descriptions-item label="个性签名">
                 {{  currentData.sign}}
            </el-descriptions-item> -->
            
        </el-descriptions>

    </div>
</template>

<script>
export default {
    props:['currentData','detailList','title'],
    data(){
        return {
            imgServer:process.env.VUE_APP_IMG_SERVER+'/upload/',
        }
    }

}
</script>

<style>

</style>